package com.fairytask.logic
{
	import com.fairytask.data.Modulator;
	import com.fairytask.event.NetEvent;
	
	import flash.events.Event;

	/**
	 * 链接逻辑 
	 * @author hanjy
	 */	
	public class NetLogic
	{
		private static var _instance	:NetLogic;
		private var model:Modulator;

		public static function get instance():NetLogic
		{
			if(null==_instance)
			{
				_instance	=	new NetLogic();
			}
			return _instance;
		}
		
		public function NetLogic()
		{
			//事件
			model	=	Modulator.instance;
			
			initEvent();
		}
		
		/**
		 * 初始化事件 
		 * 
		 */
		private function initEvent():void
		{
			model.addEventListener(NetEvent.CONNECT,onConnect);
		}
		
		/**
		 * 处理连接 
		 * @param event
		 * 
		 */
		protected function onConnect(event:Event):void
		{
			
		}
		
	}
}